﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Modelo;

namespace Interface
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            
        }
        private GridLength _rememberWidth = GridLength.Auto;

        private void Grid_Collapsed(object sender, RoutedEventArgs e)
        {
            var grid = sender as Grid;
            if (grid != null)
            {
                _rememberWidth = grid.ColumnDefinitions[1].Width;
                grid.ColumnDefinitions[1].Width = GridLength.Auto;
            }
        }

        private void Grid_Expanded(object sender, RoutedEventArgs e)
        {
            var grid = sender as Grid;
            if (grid != null)
            {
                grid.ColumnDefinitions[1].Width = _rememberWidth;
            }
        }

        private void button2_Click(object sender, RoutedEventArgs e)
        {

        }

        private void button4_Click(object sender, RoutedEventArgs e)
        {
            frame1.Source = new Uri("pruebita.xaml",UriKind.Relative);
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            frame1.Source = new Uri("Ventas.xaml", UriKind.Relative);
        }

        private void button5_Click(object sender, RoutedEventArgs e)
        {
            frame1.Source = new Uri("Productos.xaml",UriKind.Relative);
        }

        private void button2_Click_1(object sender, RoutedEventArgs e)
        {
            frame1.Source = new Uri("Clientes.xaml", UriKind.Relative);
        }

        private void button8_Click(object sender, RoutedEventArgs e)
        {
            frame1.Source = new Uri("Salario.xaml", UriKind.Relative);
        
        }

        private void expander2_Expanded(object sender, RoutedEventArgs e)
        {

        }

        private void expander3_Expanded(object sender, RoutedEventArgs e)
        {

        }

        private void expander3_Expanded_1(object sender, RoutedEventArgs e)
        {

        }

        private void button9_Click(object sender, RoutedEventArgs e)
        {
            frame1.Source = new Uri("Usuarios.xaml", UriKind.Relative);
        }

        private void button7_Click(object sender, RoutedEventArgs e)
        {

        }
    }
}
